<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<body>
<style type="text/css">
	#tbCurriculumHome{
		padding: 15px;
		background: #fff;
		border-radius: 10px;
	}
	.layui-inline{
		width:50%;
		margin-left: 20%;
	}
	.layui-input-block{
		margin-left: 135px;
	}
	.layui-form-label{
		width: 100px;
	}
</style>
<div id="tbCurriculumHome">
	<fieldset class="layui-elem-field layui-field-title site-title">
		<legend><a name="fixbar">课程信息</a></legend>
	</fieldset>
	<form id="tbClassStateForm" method="post" class="layui-form white-bg radius">
		<input type = "hidden" name = "limit" value="${param.limit}">
		<input type = "hidden" name = "page" value="${param.page}">
		<input type="hidden" name="id" value="${model.id}">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">课程分类</label>
				<div class="layui-input-block">
					<%-- <input type="text" class="layui-input" name="teachingUnit" value="${model.teachingUnit}"> --%>
					<select name = "teachingUnit" lay-search>
						<c:forEach items="${data1}" var="data">
							<option value="${data.name}" <c:if test="${fn:contains(model.teachingUnit,data.name)}">selected="selected"</c:if>>${data.name}</option>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">教师</label>
				<div class="layui-input-block">
					<select  multiple="multiple" name="teacher.id" lay-filter="teacher" lay-search>
						<c:forEach items="${teacher}" var="role">
							<option value="${role.id}" <c:if test="${fn:contains(model.teacher.id,role.id)}">selected="selected"</c:if>>${role.name}</option>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">课程名称</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="courseName" value="${model.courseName}">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">课程概述</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="overview" value="${model.overview}">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">课程内容</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="content" value="${model.content}">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">课时</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="period" value="${model.period}">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">课程目标</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="objective" value="${model.objective}">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">难易度</label>
				<div class="layui-input-block">
					<%-- <input type="text" class="layui-input" name="difficultylevel" value="${model.difficultylevel}"> --%>
					<select name = "difficultylevel">
						<c:forEach items="${data}" var="data">
							<option value="${data.name}" <c:if test="${fn:contains(model.difficultylevel,data.name)}">selected="selected"</c:if>>${data.name}</option>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
	</form>
</div>

<script type="text/javascript">
form=layui.form;
form.render('select');

</script>
</body>
